package cn.edu.ctbu.lablist.repository;

import cn.edu.ctbu.lablist.domain.Teacher;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface TeacherRepository extends JpaRepository<Teacher,Integer> {

    /**
     *
     * 按名字查询
     * @param name
     * @return
     */
    List<Teacher> findByNameLike(String name);

    /**
     * 按名字和密码查询
     * @param name
     * @param password
     * @return
     */
    List<Teacher> findByNameAndPassword(String name,String password);

    /**
     * 按教师编号和密码查询
     * @param no
     * @param password
     * @return
     */
    List<Teacher> findByNoAndPassword(String no,String password);
    /**
     * 按入职年份查找
     * @param year
     * @return
     */
    //List<Teacher> findByYear(String year);

    /**
     * 按工号查找
     * @param no
     * @return
     */
    Teacher findByNoLike(String no);
}
